/*
 * Created on 10/10/2011 - 4:00 AM
 */
package sembr.vtk.reader;

import vtk.vtkOBJReader;
import vtk.vtkPolyData;

/**
 *
 * @author Adriano
 */
public class ObjReader extends ReaderBase
{
    private vtkOBJReader reader;    
    
    public ObjReader(String filePath) 
    {
        super.setFilePath(filePath);        
        reader = new vtkOBJReader();
        processDataFromReader();
    }
    
    private void processDataFromReader()
    {
        reader.SetFileName(super.getFilePath());
        reader.Update();
    }     
    
    @Override
    public vtkPolyData getPolyData() 
    {
        return reader.GetOutput();
    }   
}
